/*
 * Copyright (c) 2019. Mikes. All rights reserved.
 *
 * You can contact me with sending email to bWlrZXNfMjAxMkAxNjMuY29t for more information!
 */

package com.climber.android.ui

import android.view.View
import com.bumptech.glide.Glide
import com.climber.android.R
import com.climber.android.commonres.ui.BaseMVPFragment
import io.ganguo.library.mvp.ui.mvp.IPresenter
import io.ganguo.library.mvp.ui.mvp.di.component.AppComponent
import kotlinx.android.synthetic.main.app_fragment_welcome.*


/**
 * Created by mikes on 2017-8-29.
 */
class WelcomeFragment : BaseMVPFragment<IPresenter>() {
    override fun setupFragmentComponent(appComponent: AppComponent) {
    }

    override fun getLayoutResourceId(): Int = R.layout.app_fragment_welcome

    override fun initView(view: View) {
    }

    override fun initListener() {
    }

    override fun initData() {
        if(arguments?.containsKey("welcomePNG") == true){
            arguments?.getString("welcomePNG")?.let {
                Glide.with(this).load(it).into(lottie_welcome_animation)
            }
        } else if(arguments?.containsKey("defaultPNG") == true){
            arguments?.getInt("defaultPNG")?.let {
                Glide.with(this).load(it).into(lottie_welcome_animation)
            }
        }
    }
}